package com.shkco.xbjcc.service.impl;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.shkco.xbjcc.domain.Systemdictionary;
import com.shkco.xbjcc.mapper.SystemdictionaryMapper;
import com.shkco.xbjcc.service.ISystemdictionaryService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.xml.ws.Action;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author whale
 * @since 2022-09-23
 */
@Service
public class SystemdictionaryServiceImpl extends ServiceImpl<SystemdictionaryMapper, Systemdictionary> implements ISystemdictionaryService {

    @Autowired
    private SystemdictionaryMapper systemdictionaryMapper;

    @Override
    public void patchDel(List<Long> ids) {
        systemdictionaryMapper.patchDel(ids);
    }

    @Override
    @Cacheable(cacheNames="systemdictionary",key="'list'")
    public List<Systemdictionary> selectList(Wrapper<Systemdictionary> wrapper) {
        return super.selectList(wrapper);
    }

    @Override
    @CacheEvict(cacheNames="systemdictionary",key="'list'")
    public boolean updateById(Systemdictionary entity) {
        return super.updateById(entity);
    }

    @Override
    @CacheEvict(cacheNames="systemdictionary",key="'list'")
    public boolean insert(Systemdictionary entity) {
        return super.insert(entity);
    }

    @Override
    @CacheEvict(cacheNames="systemdictionary",key="'list'")
    public boolean deleteById(Serializable id) {
        return super.deleteById(id);
    }
}
